﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MySkiPatrolSite.AdminSvc.Member>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	MemberEdit
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Member Details - <%: Model.FullName %></h2>

    <div>
        <%: Html.ActionLink("Back to List", "Members") %>
    </div>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
        <%: Html.HiddenFor(model => model.ID) %>
        <input type="hidden" id="Action" name="Action" value="<%:string.Empty %>" />
        <div style="width: 100%;height: 500px;overflow: scroll;">
        <fieldset>
            <legend>Fields</legend>
            
            <!--<div class="editor-label">
                <%: Html.LabelFor(model => model.Prefix) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Prefix) %>
                <%: Html.ValidationMessageFor(model => model.Prefix) %>
            </div>-->

            <div class="editor-label">
                <%: Html.LabelFor(model => model.FirstName) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.FirstName) %>
                <%: Html.ValidationMessageFor(model => model.FirstName) %>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.MiddleName) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.MiddleName) %>
                <%: Html.ValidationMessageFor(model => model.MiddleName) %>
            </div>
         
            <div class="editor-label">
                <%: Html.LabelFor(model => model.LastName) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.LastName) %>
                <%: Html.ValidationMessageFor(model => model.LastName) %>
            </div>
            
            <!--<div class="editor-label">
                <%: Html.LabelFor(model => model.Suffix) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Suffix) %>
                <%: Html.ValidationMessageFor(model => model.Suffix) %>
            </div>-->

            <div class="editor-label">
                <%: Html.LabelFor(model => model.NSPNumber) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.NSPNumber) %>
                <%: Html.ValidationMessageFor(model => model.NSPNumber) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Username) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Username) %>
                <%: Html.ValidationMessageFor(model => model.Username) %>
            </div>
            
            <p>

                <button type="submit" id="save" onclick="functionAction('save')">Save</button>
                <button type="submit" id="cancel" onclick="functionAction('cancel')">Cancel</button>
                <button type="submit" id="delete" onclick="functionAction('delete')">Delete</button>
            </p>
        </fieldset>
        </div>
    <% } %>

    <div>
        <%: Html.ActionLink("Back to List", "Members") %>
    </div>

    <script type="text/javascript">
        function functionAction(action) {
            document.getElementById('Action').value = action;

        }

        
    </script>

</asp:Content>

